/**
 * @author YinHang
 */
;(function () {
	if(!path)
		alert("没有定义path变量.");
	window._global = window;
	//动态访问的Action维护
	if(!_global.ACTIONS)
		_global.ACTIONS = {};
	//客户端模式
	_global.CLIENT_MODE = "run";
	//文件路径
	_global.SCRIPT_FOLDER = path + "/javascript";
	_global.CONFIG_FILE_FOLDER = _global.SCRIPT_FOLDER + "/config/ajax";
	_global.HISTORY_FILE_FOLDER = _global.SCRIPT_FOLDER + "/system/history";
	//装载配置
	_global.loadConfig = function (fileName, callback) {
		$.ajax({
			  url: fileName,
			  dataType: "script",
			  async: false,
			  cache: true,
			  success: callback
			});
	};
	//装载配置队列
	_global.loadConfigQueue = function (fileNames) {
		var size = fileNames.length;
		for(var i=0;i<size;++i)
			loadConfig(_global.CONFIG_FILE_FOLDER + "/" + fileNames[i]);
	};
})();
